package com.gitee.wsl.android.ext.service.alter

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.gitee.wsl.service.Alarm
import com.gitee.wsl.service.RECEIVER_ALARM_ID
import com.gitee.wsl.service.RECEIVER_ALARM_MESSAGE

class AlarmReceiver: BroadcastReceiver() {

    override fun onReceive(context: Context, intent: Intent?) {
        val alarmItemId = intent?.getStringExtra(RECEIVER_ALARM_ID,) ?: return
        val message = intent.getStringExtra(RECEIVER_ALARM_MESSAGE) ?: return
        Alarm.alarmServer.fireAlarmReceive(alarmItemId)
    }

}